/*
 * @Author: kangchao kangchao@sxdata.com.cn
 * @Date: 2024-11-27 09:47:28
 * @LastEditors: kangchao kangchao@sxdata.com.cn
 * @LastEditTime: 2024-11-27 10:02:57
 * @FilePath: \vue-project\src\i18n\index.js
 * @Description: 
 * 
 */
// 引入i18n
import { createI18n } from 'vue-i18n'
import zh from './langs/zh.js'
import en from './langs/en.js'
import zhCn from '@arco-design/web-vue/es/locale/lang/zh-cn.js'
import enUs from '@arco-design/web-vue/es/locale/lang/en-us.js'
// 创建 i18n 实例并配置选项
export const i18n = createI18n({
  legacy: false,
  globalInjection: true,
  locale: localStorage.getItem('language') || 'zh',
  messages: {
    zh: {
      ...zh,
      ...zhCn
    },
    en: {
      ...en,
      ...enUs
    }
  }
})
